package com.tedu.egmybatis1.Mapper;

import com.tedu.egmybatis1.Pojo.entity.Product;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper

public interface ProductMapper {
    @Insert("insert into product(title,price,stock) " +
            "values(#{title},#{price},#{stock})")
    int insert(Product product);
    @Delete("DELETE FROM product WHERE id=#{id}")
    int deleteById(Integer id);
}
